Refactor SpotifyControls to strictly derive active device and tighten Playwright VRTs - #9684
Conversation
…\n\n- Removed redundant `selectedDeviceId` useState and its synchronizing `useEffect` in `SpotifyControls.tsx`, now deriving `resolvedId` strictly from the available `devices` array to prevent state desynchronization.\n- Reverted arbitrary increases to `maxDiffPixelRatio` thresholds in `vrt-dashboard.spec.ts` back to standard `0.1` and `0.05` to ensure strict test stability.\n- Reverted accessibility test target in `vrt-components.spec.ts` from full page to component scope. Co-authored-by: arii <342438+arii@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
👋 Welcome to HRM!Thanks for your contribution. This repository uses Gemini AI for automated triage, code review, and generation. 🤖 Gemini Manual Trigger Quick Reference
For more details and GitHub CLI examples, see the Manual Trigger Guide. |
ℹ️ Gemini Review DisabledAutomatic review is currently disabled via Via Comment: Via GitHub Actions:
Via GitHub CLI: gh workflow run reusable-gemini-review.yml -f pr_number=9684🤖 Gemini Manual Trigger GuideTo re-enable: Set repository variable |
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
94451eb
into
fix/spotify-volume-control-issues-7076295242487717640
selectedDeviceIdand its complexuseEffectsynchronization. The component now purely derives theresolvedIdfrom the incoming WebSocketdeviceslist (prioritizing the active device or HRM web player). This simplification removes an unnecessary layer of state management and strictly conforms to React "derive state" best practices. The intentionaluseReducerpattern for volume grace periods was preserved.maxDiffPixelRatiovalues invrt-dashboard.spec.tswere strictly restored to0.1and0.05to prevent masking test flakiness. The accessibility check scope invrt-components.spec.tswas restored to target only the componentmenurather than the wholedashboardPage.pnpm run lint,test:unit, andtest:visual.PR created automatically by Jules for task 13279002347226258517 started by @arii